1850s nautical slang, perhaps from British naval phrase commodity bag.
A small bag for one's personal belongings, usually exclusive of clothing
[1850s+ Nautical; origin uncertain; perhaps short for commodity, fr the earlier British naval term commodity box, which became ditty box]